package com.xcesys.extras.dataobject;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;

/**
 * This class defines some properties enables entity object with version control
 * either through comparing version counter explicitly, or done automatically by
 * ORM framework.
 * 
 * @author Danne
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DeleteableObject")
public abstract class DeleteableObject extends VersionableObject {

	private static final long serialVersionUID = 46226780486252667L;
	/** logic deleted flag */
	@XmlAttribute(name = "Deleted")
	private Boolean deleted = false;

	@XmlAttribute(name = "DeletedAt")
	private Date deletedAt;

	@XmlAttribute(name = "DeletedBy")
	private String deletedBy;

	public DeleteableObject() {
	}

	public Boolean getDeleted() {
		return deleted;
	}

	public Date getDeletedAt() {
		return deletedAt;
	}

	public String getDeletedBy() {
		return this.deletedBy;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}

	public void setDeletedAt(Date deletedAt) {
		this.deletedAt = deletedAt;
	}

	public void setDeletedBy(String updateBy) {
		this.deletedBy = updateBy;
	}

}
